package com.yimicloud.common.freemarker;

import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 * Created by Justin on 2015/9/7.
 */

public class StringTrimAdapter extends XmlAdapter<String, String> {
    public StringTrimAdapter() {
    }

    public String unmarshal(String v) throws Exception {
        return v == null?null:v.trim();
    }

    public String marshal(String v) throws Exception {
        return v;
    }
}
